package twentytwentyone_3;

import java.util.Arrays;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2021-03-23 16:40
 * @Modified By:
 */
public class MaximumProduct_628 {
    public static void main(String[] args){

    }

    public static int maximumProduct(int[] nums){
        Arrays.sort(nums);
        int len = nums.length;
        return Math.max(nums[0] * nums[1] * nums[len - 1], nums[len - 1] * nums[len - 2] * nums[len - 3]);
    }
}
